<html>
<head>
<script>
function replaceBody()
{
  var accService = Components.classes["@mozilla.org/accessibilityService;1"].
    getService(Components.interfaces.nsIAccessibilityService);
  accService.getAccessibleFor(document);

  var newBody = document.createElement("body");
  newBody.setAttribute("contentEditable", "true");
  newBody.textContent = "New Hello";
  document.documentElement.replaceChild(newBody, document.body);
  getComputedStyle(newBody, "").color;
}
</script>
</head>
<body onload="replaceBody();">
OLD hello
</body>
</html>

